import { WebPlugin } from '@capacitor/core';

import type {
  BankCardResult,
  BaiduOcrPlugin,
  IdCardOptions,
  idCardOptionsType,
  IdCardResult,
} from './definitions';

export class BaiduOcrWeb extends WebPlugin implements BaiduOcrPlugin {
  async idCard<K extends idCardOptionsType>(
    options: IdCardOptions,
  ): Promise<IdCardResult[K]> {
    console.log(options);
    return {} as IdCardResult[K];
  }
  async bankCard(): Promise<BankCardResult> {
    return {} as BankCardResult;
  }
  async echo(options: { value: string }): Promise<{ value: string }> {
    console.log('ECHO', options);
    return options;
  }
}
